#include <stdio.h>
#include <string.h>
char buf[2505*30];
int nums = 0;
int Abs(int x) {return x>=0?x:-x;}
void judge(int n) {
  int awin=0, bwin=0;
  for(int i=0; i<nums; ++i) {
    if(buf[i]=='E') {
      printf("%d:%d\n", awin, bwin);
      return;
    }
    if(buf[i]=='W') awin++;
    else bwin++;
    if((awin>=n || bwin>=n) && Abs(awin-bwin)>=2) {
      printf("%d:%d\n", awin, bwin);
      awin=bwin=0;
    }
  }
}
int main() {
  while(scanf("%s\n", buf+nums)!=EOF) nums+=strlen(buf+nums);
  judge(11);
  putchar('\n');
  judge(21);
}

